YES 0.962
H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/List.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:
↳ HASKELL
↳ IFR
mainModule List
| ((delete :: Char -> [Char] -> [Char]) :: Char -> [Char] -> [Char]) |
module List where
| import qualified Maybe import qualified Prelude
|
| delete :: Eq a => a -> [a] -> [a]
|
| deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a]
deleteBy | _ _ [] | = | [] |
deleteBy | eq x (y : ys) | = | if x `eq` y then ys else y : deleteBy eq x ys |
|
module Maybe where
| import qualified List import qualified Prelude
|
If Reductions:
The following If expression
if eq x y then ys else y : deleteBy eq x ys
is transformed to
deleteBy0 | ys y eq x True | = ys |
deleteBy0 | ys y eq x False | = y : deleteBy eq x ys |
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
mainModule List
| ((delete :: Char -> [Char] -> [Char]) :: Char -> [Char] -> [Char]) |
module List where
| import qualified Maybe import qualified Prelude
|
| delete :: Eq a => a -> [a] -> [a]
|
| deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a]
deleteBy | _ _ [] | = | [] |
deleteBy | eq x (y : ys) | = | deleteBy0 ys y eq x (x `eq` y) |
|
|
deleteBy0 | ys y eq x True | = | ys |
deleteBy0 | ys y eq x False | = | y : deleteBy eq x ys |
|
module Maybe where
| import qualified List import qualified Prelude
|
Replaced joker patterns by fresh variables and removed binding patterns.
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
mainModule List
| ((delete :: Char -> [Char] -> [Char]) :: Char -> [Char] -> [Char]) |
module List where
| import qualified Maybe import qualified Prelude
|
| delete :: Eq a => a -> [a] -> [a]
|
| deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a]
deleteBy | vw vx [] | = | [] |
deleteBy | eq x (y : ys) | = | deleteBy0 ys y eq x (x `eq` y) |
|
|
deleteBy0 | ys y eq x True | = | ys |
deleteBy0 | ys y eq x False | = | y : deleteBy eq x ys |
|
module Maybe where
| import qualified List import qualified Prelude
|
Cond Reductions:
The following Function with conditions
is transformed to
undefined0 | True | = undefined |
undefined1 | | = undefined0 False |
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
mainModule List
| (delete :: Char -> [Char] -> [Char]) |
module List where
| import qualified Maybe import qualified Prelude
|
| delete :: Eq a => a -> [a] -> [a]
|
| deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a]
deleteBy | vw vx [] | = | [] |
deleteBy | eq x (y : ys) | = | deleteBy0 ys y eq x (x `eq` y) |
|
|
deleteBy0 | ys y eq x True | = | ys |
deleteBy0 | ys y eq x False | = | y : deleteBy eq x ys |
|
module Maybe where
| import qualified List import qualified Prelude
|
Haskell To QDPs
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
new_deleteBy0(wu17, wu18, wu19, Zero, Succ(wu210)) → new_deleteBy00(wu17, wu18, wu19)
new_deleteBy(wu300, :(wu410, wu411)) → new_deleteBy01(wu411, wu410, Char(Succ(wu300)))
new_deleteBy01(:(wu410, wu411), Char(Zero), Char(Succ(wu300))) → new_deleteBy01(wu411, wu410, Char(Succ(wu300)))
new_deleteBy0(wu17, wu18, wu19, Succ(wu200), Succ(wu210)) → new_deleteBy0(wu17, wu18, wu19, wu200, wu210)
new_deleteBy0(wu17, wu18, wu19, Succ(wu200), Zero) → new_deleteBy(wu19, wu17)
new_deleteBy00(wu17, wu18, wu19) → new_deleteBy(wu19, wu17)
new_deleteBy01(wu41, Char(Succ(wu4000)), Char(Succ(wu300))) → new_deleteBy0(wu41, wu4000, wu300, wu300, wu4000)
new_deleteBy01(:(wu410, wu411), Char(Succ(wu4000)), Char(Zero)) → new_deleteBy01(wu411, wu410, Char(Zero))
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs.
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_deleteBy01(:(wu410, wu411), Char(Succ(wu4000)), Char(Zero)) → new_deleteBy01(wu411, wu410, Char(Zero))
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_deleteBy01(:(wu410, wu411), Char(Succ(wu4000)), Char(Zero)) → new_deleteBy01(wu411, wu410, Char(Zero))
The graph contains the following edges 1 > 1, 1 > 2, 3 >= 3
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
new_deleteBy(wu300, :(wu410, wu411)) → new_deleteBy01(wu411, wu410, Char(Succ(wu300)))
new_deleteBy0(wu17, wu18, wu19, Zero, Succ(wu210)) → new_deleteBy00(wu17, wu18, wu19)
new_deleteBy01(:(wu410, wu411), Char(Zero), Char(Succ(wu300))) → new_deleteBy01(wu411, wu410, Char(Succ(wu300)))
new_deleteBy0(wu17, wu18, wu19, Succ(wu200), Succ(wu210)) → new_deleteBy0(wu17, wu18, wu19, wu200, wu210)
new_deleteBy0(wu17, wu18, wu19, Succ(wu200), Zero) → new_deleteBy(wu19, wu17)
new_deleteBy00(wu17, wu18, wu19) → new_deleteBy(wu19, wu17)
new_deleteBy01(wu41, Char(Succ(wu4000)), Char(Succ(wu300))) → new_deleteBy0(wu41, wu4000, wu300, wu300, wu4000)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_deleteBy01(:(wu410, wu411), Char(Zero), Char(Succ(wu300))) → new_deleteBy01(wu411, wu410, Char(Succ(wu300)))
The graph contains the following edges 1 > 1, 1 > 2, 3 >= 3
- new_deleteBy01(wu41, Char(Succ(wu4000)), Char(Succ(wu300))) → new_deleteBy0(wu41, wu4000, wu300, wu300, wu4000)
The graph contains the following edges 1 >= 1, 2 > 2, 3 > 3, 3 > 4, 2 > 5
- new_deleteBy(wu300, :(wu410, wu411)) → new_deleteBy01(wu411, wu410, Char(Succ(wu300)))
The graph contains the following edges 2 > 1, 2 > 2
- new_deleteBy00(wu17, wu18, wu19) → new_deleteBy(wu19, wu17)
The graph contains the following edges 3 >= 1, 1 >= 2
- new_deleteBy0(wu17, wu18, wu19, Succ(wu200), Succ(wu210)) → new_deleteBy0(wu17, wu18, wu19, wu200, wu210)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 > 4, 5 > 5
- new_deleteBy0(wu17, wu18, wu19, Zero, Succ(wu210)) → new_deleteBy00(wu17, wu18, wu19)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3
- new_deleteBy0(wu17, wu18, wu19, Succ(wu200), Zero) → new_deleteBy(wu19, wu17)
The graph contains the following edges 3 >= 1, 1 >= 2